const files = require.context('./', true, /\.js$/)

let api = new Map()
files.keys().forEach(file => {
  const fileKey = file.replace(/\.\/|\.js/g, '')
  if (fileKey !== 'index') {
    api = Object.assign(api, files(file))
  }
})
export default api
